﻿namespace HRM.CORE.Machine
{
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraBars.Alerter;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Grid;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;

    using Dictionary;
    using HRM.CORE;
    using Extra;
    using System; using Extra.ERP;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Drawing;
    using System.IO;
    using System.Runtime.CompilerServices;
    using System.Threading;
    using System.Windows.Forms; using Common;
    using Dictionary.ERP;
    using Common;
    using APP.HELPER.Utils.CustomizeToolbox;
    using APP.HELPER.Data.Helper;
    using DevExpress.XtraGrid.Views.Base;
    using APP.HELPER.Utils.Excel;

    public class xucAtt : Common.xucBase
    {
        private AlertControl alertControl1;
        private Bar bar1;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeCC;
        private BarEditItem bbeCCTo;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiConnect;
        private BarButtonItem bbiExport;
        private BarButtonItem bbiGetGeneralLogData;
        private BarButtonItem bbiImport;
        private BarButtonItem bbiImportText;
        private BarButtonItem bbiUpdate;
        private PictureEdit btFind;
        private SimpleButton btGetGeneralLogData;
        private SimpleButton btImport;
        private SimpleButton btImportText;
        private SimpleButton btMachine;
        private Button btnGetDeviceStatus;
        private Button btnGetGeneralExtLogData;
        private Button btnGetGeneralLogDataStr;
        private Button btnRsConnect;
        private Button btnUSBConnect;
        private SimpleButton btSaveConfig;
        private SimpleButton btUpdate;
        private System.Windows.Forms.ComboBox cbBaudRate;
        private System.Windows.Forms.ComboBox cbPort;
        private CheckEdit checkAlert;
        private CheckEdit checkConnect;
        private CheckEdit checkFilter;
        private GridColumn colDate;
        private GridColumn colEmployeeCode;
        private GridColumn colEmployeeName;
        private GridColumn colEnrollNumber;
        private GridColumn colHour;
        private GridColumn colMachineCode;
        private GridColumn colMachineID;
        private GridColumn colMachineName;
        private GridColumn colStateInOut;
        private IContainer components = null;
        private DateEdit dtCC;
        private DateEdit dtCCTo;
        private DataTable EnrollDataTable = HRM_TIMEKEEPER_MACHINE.CreateNullEmployeesDataTable();
        private FlowLayoutPanel flowMachineItem;
        private GridView gbList;
        private GridControl gcList;
        private GroupBox grOption;
        private GroupBox groupBox3;
        private GroupBox groupBox4;
        private GroupBox groupBox5;
        private GroupControl groupConnectInformation;
        private GroupControl grTimesheetsData;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private Label label11;
        private Label label4;
        private Label label5;
        private Label label6;
        private Label label7;
        private Label label8;
        private Label label9;
        private LabelControl labelControl1;
        private LabelControl labelControl10;
        private LabelControl labelControl11;
        private LabelControl labelControl12;
        private LabelControl labelControl2;
        private LabelControl labelControl3;
        private LabelControl labelControl4;
        private LabelControl labelControl5;
        private LabelControl labelControl6;
        private LabelControl labelControl7;
        private LabelControl labelControl8;
        private LabelControl labelControl9;
        private Label lblState;
        private LabelControl lbStatus;
        private BarStaticItem lbTotal;
        private LoadingCircleToolStripMenuItem loadingCircle;
        private int m_CountConnectDeviceFail = 0;
        private int m_CountConnectDeviceSuccess = 0;
        private string m_IP = "";
        private string m_MachineCode = "";
        private string m_Port = "";
        private int m_RowRefresh = 0;
        private string option = (Application.StartupPath + @"\Layout\machineOption.xml");
        private Panel panel1;
        private Panel panel2;
        private Panel panel3;
        private PanelControl pnStatus;
        private PopupMenu popupMenu1;
        private PictureBox ptFail;
        private PictureBox ptSuccess;
        private RadioButton rbUSB;
        private RadioButton rbVUSB;
        private RepositoryItemDateEdit repDate;
        private RepositoryItemGridLookUpEdit repMachine;
        private RepositoryItemComboBox repositoryItemComboBox1;
        private RepositoryItemDateEdit repositoryItemDateEdit1;
        private RepositoryItemDateEdit repositoryItemDateEdit2;
        private GridView repositoryItemGridLookUpEdit1View;
        private RepositoryItemTextEdit repositoryItemTextEdit1;
        private RepositoryItemTextEdit repositoryItemTextEdit2;
        private RepositoryItemTimeEdit repTime;
        private SplitContainerControl splitContainerControl1;
        private TabControl tabControl1;
        private TabPage tabPage1;
        private TabPage tabPage2;
        private TabPage tabPage3;
        private TextBox txtMachineSN;
        private TextBox txtMachineSN2;
        private XtraScrollableControl xtraScrollableControl1;

        public event CallEventHandler Call;

        public xucAtt()
        {
            this.InitializeComponent();
            base.RestoreLayout(this.gbList, this);
            this.InitComponent();
            this.CreateNullDatabase();
            this.InitMachine();
            this.InitOption();
        }

        private void alertControl1_ButtonClick(object sender, AlertButtonClickEventArgs e)
        {
            if (e.ButtonName == "alertView")
            {
                this.InvokeCall();
            }
        }

        private void bbeCC_EditValueChanged(object sender, EventArgs e)
        {
            if (this.dtCC.DateTime != Convert.ToDateTime(this.bbeCC.EditValue.ToString()))
            {
                this.dtCC.DateTime = Convert.ToDateTime(this.bbeCC.EditValue.ToString());
            }
        }

        private void bbeCCTo_EditValueChanged(object sender, EventArgs e)
        {
            if (this.dtCCTo.DateTime != Convert.ToDateTime(this.bbeCCTo.EditValue.ToString()))
            {
                this.dtCCTo.EditValue = Convert.ToDateTime(this.bbeCCTo.EditValue.ToString());
            }
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (base.ParentForm != null)
            {
                base.ParentForm.Close();
            }
        }

        private void bbiConnect_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.ConnectMultipleDevice();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Danh S\x00e1ch Nh\x00e2n Vi\x00ean", "Xuất");
            base.Export();
        }

        private void bbiGetGeneralLogData_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.btGetGeneralLogData_Click(sender, e);
        }

        private void bbiImport_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Import();
        }

        private void bbiImportText_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.ImportText();
        }

        private void bbiUpdate_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.btUpdate_Click(sender, e);
        }

        private void btFind_Click(object sender, EventArgs e)
        {
            this.FindMachine(true, Actions.None, new DIC_MACHINE());
        }

        private void btGetGeneralLogData_Click(object sender, EventArgs e)
        {
            if (this.m_CountConnectDeviceSuccess == 0)
            {
                XtraMessageBox.Show("Chưa c\x00f3 thiết bị m\x00e1y chấm c\x00f4ng n\x00e0o được kết nối!\r\nVui l\x00f2ng kết nối 1 hoặc nhiều thiết bị bạn c\x00f3 trước khi tải dữ liệu!", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                this.CreateNullDatabase();
                foreach (xucMachineItem item in this.flowMachineItem.Controls)
                {
                    if (item.IsConnected)
                    {
                        item.GetGeneralLogData(this.checkFilter.Checked, Convert.ToDateTime(this.bbeCC.EditValue.ToString()), Convert.ToDateTime(this.bbeCCTo.EditValue.ToString()));
                    }
                }
            }
        }

        private void btImport_Click(object sender, EventArgs e)
        {
            this.Import();
        }

        private void btImportText_Click(object sender, EventArgs e)
        {
            this.ImportText();
        }

        private void btMachine_Click(object sender, EventArgs e)
        {
            xfmMachine machine = new xfmMachine();
            machine.Added += (s, i) => this.FindMachine(false, Actions.Add, i);
            machine.Updated += (s, i) => this.FindMachine(false, Actions.Update, i);
            machine.Deleted += (s, i, ev) => this.FindMachine(false, Actions.Delete, i);
            machine.ShowDialog();
        }

        private void btSaveConfig_Click(object sender, EventArgs e)
        {
            DataSet set = new DataSet();
            using (DataTable table = new DataTable())
            {
                table.Columns.Add("ThongBao", typeof(string));
                table.Columns.Add("Loc", typeof(string));
                table.Columns.Add("KetNoi", typeof(string));
                object[] objArray = new object[] { this.checkAlert.Checked, this.checkFilter.Checked, this.checkConnect.Checked };
                table.Rows.Add(new object[0]);
                table.Rows[0][0] = objArray[0];
                table.Rows[0][1] = objArray[1];
                table.Rows[0][2] = objArray[2];
                set.Tables.Add(table);
            }
            set.WriteXml(this.option);
            XtraMessageBox.Show("Cấu h\x00ecnh đ\x00e3 được lưu", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
        }

        private void btUpdate_Click(object sender, EventArgs e)
        {
            xfmSelectFromDateToDate.SelectedEventHander hander = null;
            if (this.gbList.RowCount == 0)
            {
                XtraMessageBox.Show("Kh\x00f4ng c\x00f3 dữ liệu để thực thi t\x00e1c vụ n\x00e0y!\r\nVui l\x00f2ng kết nối để tải dữ liệu từ m\x00e1y chấm c\x00f4ng về hoặc nạp dữ liệu từ tập tin (*.xls) hoặc (*.txt)", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else if (this.m_CountConnectDeviceSuccess == 0)
            {
                xfmSelectFromDateToDate date = new xfmSelectFromDateToDate(Convert.ToDateTime(this.bbeCC.EditValue.ToString()), Convert.ToDateTime(this.bbeCCTo.EditValue.ToString()));
                if (hander == null)
                {
                    hander = delegate (object s, System.DateTime FromDate, System.DateTime ToDate) {
                        (s as XtraForm).Close();
                        this.bbeCC.EditValue = FromDate;
                        this.bbeCCTo.EditValue = ToDate;
                        this.Refresh();
                        this.UpdateTimekeeper();
                    };
                }
                date.Selected += hander;
                date.ShowDialog();
            }
            else
            {
                this.UpdateTimekeeper();
            }
        }

        private void checkFilter_CheckedChanged(object sender, EventArgs e)
        {
        }

        private void ConnectMultipleDevice()
        {
            if (this.m_CountConnectDeviceSuccess == 0)
            {
                foreach (xucMachineItem item in this.flowMachineItem.Controls)
                {
                    item.Connect();
                }
            }
            else
            {
                foreach (xucMachineItem item in this.flowMachineItem.Controls)
                {
                    if (item.IsConnected)
                    {
                        item.DisConnect();
                    }
                }
            }
        }

        private void Count()
        {
            this.lbStatus.Text = "";
            foreach (xucMachineItem item in this.flowMachineItem.Controls)
            {
                if (item.IsConnected)
                {
                    this.lbStatus.Text = string.Concat(new object[] { this.lbStatus.Text, " <color=blue>", item.MachineName, ":</color> <color=red><b>", item.Count(), "</b></color> <color=blue>(d\x00f2ng)</color> " });
                }
            }
        }

        private void CreateNullDatabase()
        {
            this.gcList.DataSource = new HRM_TIMEKEEPER_MACHINE().CreateNullDataTable();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void dtCC_EditValueChanged(object sender, EventArgs e)
        {
            if (this.dtCC.DateTime != Convert.ToDateTime(this.bbeCC.EditValue.ToString()))
            {
                this.bbeCC.EditValue = this.dtCC.DateTime;
            }
        }

        private void dtCCTo_EditValueChanged(object sender, EventArgs e)
        {
            if (this.dtCCTo.DateTime != Convert.ToDateTime(this.bbeCCTo.EditValue.ToString()))
            {
                this.bbeCCTo.EditValue = this.dtCCTo.DateTime;
            }
        }

        private void FindMachine(bool IsResetAll, Actions Actions, DIC_MACHINE Machine)
        {
            int num = 0;
            try
            {
                num = int.Parse(Machine.Password);
            }
            catch
            {
                num = 0;
            }
            if (IsResetAll)
            {
                foreach (xucMachineItem item in this.flowMachineItem.Controls)
                {
                    if (item.IsConnected)
                    {
                        item.DisConnect();
                    }
                }
                this.flowMachineItem.Controls.Clear();
                this.InitMachine();
            }
            else
            {
                switch (Actions)
                {
                    case Actions.Add:
                        this.InitOneMachine(Machine);
                        break;

                    case Actions.Update:
                        foreach (xucMachineItem item in this.flowMachineItem.Controls)
                        {
                            if (Machine.MachineCode == item.MachineCode)
                            {
                                if (item.IsConnected)
                                {
                                    item.DisConnect();
                                }
                                item.MachineName = Machine.MachineName;
                                item.IP = Machine.IP;
                                item.Port = Machine.PortID;
                                item.Password = num;
                                item.LoadInterface(true);
                            }
                        }
                        break;

                    case Actions.Delete:
                        foreach (xucMachineItem item in this.flowMachineItem.Controls)
                        {
                            if (Machine.MachineCode == item.MachineCode)
                            {
                                if (item.IsConnected)
                                {
                                    item.DisConnect();
                                }
                                this.flowMachineItem.Controls.Remove(item);
                            }
                        }
                        break;
                }
            }
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                base.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)), this.gbList, this);
            }
        }

        private void Import()
        {
            DataTable dataTable = new DataTable();
            SqlHelper helper = new SqlHelper();
            OpenFileDialog dialog = new OpenFileDialog {
                Filter = "Excel File(*.xls,*.xlsx)|*.xls;*.xlsx"
            };
            dialog.ShowDialog();
            if (dialog.FileName != "")
            {
                try
                {
                    this.gcList.DataSource = new HRM_TIMEKEEPER_MACHINE().CreateNullDataTable();
                    DataTable table2 = ExcelImport.ReadExcelContents(dialog.FileName);
                    List<int> FieldSelectedIndex = new List<int>();
                    List<string> fieldName = new List<string> {
                        this.colEnrollNumber.Caption,
                        this.colEmployeeCode.Caption,
                        this.colEmployeeName.Caption,
                        this.colDate.Caption,
                        this.colHour.Caption,
                        this.colStateInOut.Caption,
                        this.colMachineCode.Caption
                    };
                    string[] paramName = new string[] { table2.Rows[0][0].ToString(), table2.Rows[0][1].ToString(), table2.Rows[0][2].ToString(), table2.Rows[0][3].ToString(), table2.Rows[0][4].ToString(), table2.Rows[0][5].ToString(), table2.Rows[0][6].ToString() };
                    new xfmSelectField(fieldName, paramName, 0) { get_ = param => FieldSelectedIndex = param }.ShowDialog();
                    Options.SetWaitDialogCaption("Đang đọc dữ liệu...");
                    for (int i = 1; i < table2.Rows.Count; i++)
                    {
                        try
                        {
                            new SqlDataAdapter("select '" + table2.Rows[i][FieldSelectedIndex[0]].ToString() + "' as [EnrollNumber],'" + table2.Rows[i][FieldSelectedIndex[1]].ToString() + "' as [EmployeeCode],N'" + table2.Rows[i][FieldSelectedIndex[2]].ToString() + "' as [EmployeeName], convert(datetime,'" + table2.Rows[i][FieldSelectedIndex[3]].ToString() + "', 103) as [Date],'" + table2.Rows[i][FieldSelectedIndex[4]].ToString() + "' as [Hour],'" + table2.Rows[i][FieldSelectedIndex[5]].ToString() + "' as [StateInOut],'" + table2.Rows[i][FieldSelectedIndex[6]].ToString() + "' as [MachineID]", helper.ConnectionString).Fill(dataTable);
                        }
                        catch
                        {
                        }
                    }
                    Options.HideDialog();
                    this.gcList.DataSource = dataTable;
                }
                catch
                {
                }
            }
        }

        public void ImportText()
        {
            OpenFileDialog dialog = new OpenFileDialog();
            SqlHelper helper = new SqlHelper();
            DataTable dataTable = new DataTable();
            dialog.Filter = "Text File(*.txt)|*.txt";
            dialog.Title = "Select file text...";
            dialog.ShowDialog();
            if (dialog.FileName != null)
            {
                StreamReader reader;
                this.gcList.DataSource = new HRM_TIMEKEEPER_MACHINE().CreateNullDataTable();
                try
                {
                    reader = new StreamReader(dialog.FileName);
                }
                catch
                {
                    return;
                }
                string[] strArray = reader.ReadToEnd().Split(new char[] { '\r' });
                reader.Close();
                List<int> FieldSelectedIndex = new List<int>();
                List<string> fieldName = new List<string> {
                    this.colEnrollNumber.Caption,
                    this.colEmployeeCode.Caption,
                    this.colEmployeeName.Caption,
                    this.colDate.Caption,
                    this.colHour.Caption,
                    this.colStateInOut.Caption,
                    this.colMachineCode.Caption
                };
                string[] paramName = strArray[0].Split(new char[] { '\t' });
                new xfmSelectField(fieldName, paramName, 1) { get_ = param => FieldSelectedIndex = param }.ShowDialog();
                Options.SetWaitDialogCaption("Đang đọc dữ liệu...");
                for (int i = 1; i < strArray.Length; i++)
                {
                    string[] strArray3 = strArray[i].Split(new char[] { '\t' });
                    try
                    {
                        if ((i % 100) == 0)
                        {
                            Options.SetWaitDialogCaption("Đang th\x00eam dữ liệu..." + strArray3[FieldSelectedIndex[0]].ToString());
                        }
                    }
                    catch
                    {
                        Options.HideDialog();
                    }
                    try
                    {
                        new SqlDataAdapter("select '" + strArray3[FieldSelectedIndex[0]] + "' as [EnrollNumber],'" + strArray3[FieldSelectedIndex[1]] + "' as [EmployeeCode],'" + strArray3[FieldSelectedIndex[2]] + "' as [EmployeeName],'" + strArray3[FieldSelectedIndex[3]] + "' as [Date],'" + strArray3[FieldSelectedIndex[4]] + "' as [Hour],'" + strArray3[FieldSelectedIndex[5]] + "' as [StateInOut],'" + strArray3[FieldSelectedIndex[6]] + "' as [MachineID]", helper.ConnectionString).Fill(dataTable);
                    }
                    catch
                    {
                    }
                }
            }
            Options.HideDialog();
            this.gcList.DataSource = dataTable;
        }

        private void InitComponent()
        {
            new DIC_MACHINE().AddRepositoryGridLookupEdit(this.repMachine);
            this.repMachine.EditValueChanging += new ChangingEventHandler(this.repMachine_EditValueChanging);
            this.repMachine.EditValueChanged += new EventHandler(this.repMachine_EditValueChanged);
            this.repMachine.ButtonClick += new ButtonPressedEventHandler(this.repMachine_ButtonClick);
            this.bbeCC.EditValue = System.DateTime.Now;
            this.bbeCCTo.EditValue = System.DateTime.Now;
            this.dtCC.DateTime = System.DateTime.Now;
            this.dtCCTo.DateTime = System.DateTime.Now;
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            AlertButton button = new AlertButton();
            AlertButton button2 = new AlertButton();
            SerializableAppearanceObject appearance = new SerializableAppearanceObject();
            SuperToolTip tip = new SuperToolTip();
            ToolTipTitleItem item = new ToolTipTitleItem();
            ToolTipItem item2 = new ToolTipItem();
            ToolTipSeparatorItem item3 = new ToolTipSeparatorItem();
            ToolTipTitleItem item4 = new ToolTipTitleItem();
            SuperToolTip tip2 = new SuperToolTip();
            ToolTipTitleItem item5 = new ToolTipTitleItem();
            ToolTipItem item6 = new ToolTipItem();
            ToolTipSeparatorItem item7 = new ToolTipSeparatorItem();
            ToolTipTitleItem item8 = new ToolTipTitleItem();
            SuperToolTip tip3 = new SuperToolTip();
            ToolTipTitleItem item9 = new ToolTipTitleItem();
            ToolTipItem item10 = new ToolTipItem();
            ToolTipSeparatorItem item11 = new ToolTipSeparatorItem();
            ToolTipTitleItem item12 = new ToolTipTitleItem();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucAtt));
            this.lblState = new Label();
            this.tabControl1 = new TabControl();
            this.tabPage1 = new TabPage();
            this.tabPage2 = new TabPage();
            this.groupBox5 = new GroupBox();
            this.cbBaudRate = new System.Windows.Forms.ComboBox();
            this.label5 = new Label();
            this.txtMachineSN = new TextBox();
            this.cbPort = new System.Windows.Forms.ComboBox();
            this.label7 = new Label();
            this.label6 = new Label();
            this.btnRsConnect = new Button();
            this.tabPage3 = new TabPage();
            this.groupBox4 = new GroupBox();
            this.rbVUSB = new RadioButton();
            this.label11 = new Label();
            this.txtMachineSN2 = new TextBox();
            this.btnUSBConnect = new Button();
            this.groupBox3 = new GroupBox();
            this.rbUSB = new RadioButton();
            this.btnGetDeviceStatus = new Button();
            this.gcList = new GridControl();
            this.gbList = new GridView();
            this.colEmployeeCode = new GridColumn();
            this.colEnrollNumber = new GridColumn();
            this.colEmployeeName = new GridColumn();
            this.colHour = new GridColumn();
            this.repTime = new RepositoryItemTimeEdit();
            this.colStateInOut = new GridColumn();
            this.colMachineID = new GridColumn();
            this.colDate = new GridColumn();
            this.repDate = new RepositoryItemDateEdit();
            this.btnGetGeneralLogDataStr = new Button();
            this.label9 = new Label();
            this.label4 = new Label();
            this.btnGetGeneralExtLogData = new Button();
            this.label8 = new Label();
            this.alertControl1 = new AlertControl(this.components);
            this.popupMenu1 = new PopupMenu(this.components);
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbiConnect = new BarButtonItem();
            this.bbeCC = new BarEditItem();
            this.repositoryItemDateEdit1 = new RepositoryItemDateEdit();
            this.bbeCCTo = new BarEditItem();
            this.repositoryItemDateEdit2 = new RepositoryItemDateEdit();
            this.bbiGetGeneralLogData = new BarButtonItem();
            this.bbiUpdate = new BarButtonItem();
            this.bbiImport = new BarButtonItem();
            this.bbiImportText = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.lbTotal = new BarStaticItem();
            this.repositoryItemTextEdit1 = new RepositoryItemTextEdit();
            this.repositoryItemTextEdit2 = new RepositoryItemTextEdit();
            this.repositoryItemComboBox1 = new RepositoryItemComboBox();
            this.repMachine = new RepositoryItemGridLookUpEdit();
            this.repositoryItemGridLookUpEdit1View = new GridView();
            this.colMachineCode = new GridColumn();
            this.colMachineName = new GridColumn();
            this.grTimesheetsData = new GroupControl();
            this.lbStatus = new LabelControl();
            this.btImportText = new SimpleButton();
            this.btMachine = new SimpleButton();
            this.btUpdate = new SimpleButton();
            this.btImport = new SimpleButton();
            this.btSaveConfig = new SimpleButton();
            this.grOption = new GroupBox();
            this.checkConnect = new CheckEdit();
            this.checkFilter = new CheckEdit();
            this.checkAlert = new CheckEdit();
            this.ptSuccess = new PictureBox();
            this.splitContainerControl1 = new SplitContainerControl();
            this.groupConnectInformation = new GroupControl();
            this.xtraScrollableControl1 = new XtraScrollableControl();
            this.panel1 = new Panel();
            this.labelControl12 = new LabelControl();
            this.labelControl11 = new LabelControl();
            this.labelControl10 = new LabelControl();
            this.labelControl7 = new LabelControl();
            this.btGetGeneralLogData = new SimpleButton();
            this.dtCCTo = new DateEdit();
            this.labelControl6 = new LabelControl();
            this.labelControl5 = new LabelControl();
            this.dtCC = new DateEdit();
            this.labelControl4 = new LabelControl();
            this.labelControl3 = new LabelControl();
            this.pnStatus = new PanelControl();
            this.ptFail = new PictureBox();
            this.flowMachineItem = new FlowLayoutPanel();
            this.panel2 = new Panel();
            this.labelControl9 = new LabelControl();
            this.btFind = new PictureEdit();
            this.labelControl1 = new LabelControl();
            this.panel3 = new Panel();
            this.labelControl8 = new LabelControl();
            this.labelControl2 = new LabelControl();
            this.tabControl1.SuspendLayout();
            this.tabPage2.SuspendLayout();
            this.groupBox5.SuspendLayout();
            this.tabPage3.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.repTime.BeginInit();
            this.repDate.BeginInit();
            this.repDate.VistaTimeProperties.BeginInit();
            this.popupMenu1.BeginInit();
            this.barManager1.BeginInit();
            this.repositoryItemDateEdit1.BeginInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.BeginInit();
            this.repositoryItemDateEdit2.BeginInit();
            this.repositoryItemDateEdit2.VistaTimeProperties.BeginInit();
            this.imageCollection2.BeginInit();
            this.repositoryItemTextEdit1.BeginInit();
            this.repositoryItemTextEdit2.BeginInit();
            this.repositoryItemComboBox1.BeginInit();
            this.repMachine.BeginInit();
            this.repositoryItemGridLookUpEdit1View.BeginInit();
            this.grTimesheetsData.BeginInit();
            this.grTimesheetsData.SuspendLayout();
            this.grOption.SuspendLayout();
            this.checkConnect.Properties.BeginInit();
            this.checkFilter.Properties.BeginInit();
            this.checkAlert.Properties.BeginInit();
            ((ISupportInitialize) this.ptSuccess).BeginInit();
            this.splitContainerControl1.BeginInit();
            this.splitContainerControl1.SuspendLayout();
            this.groupConnectInformation.BeginInit();
            this.groupConnectInformation.SuspendLayout();
            this.xtraScrollableControl1.SuspendLayout();
            this.panel1.SuspendLayout();
            this.dtCCTo.Properties.VistaTimeProperties.BeginInit();
            this.dtCCTo.Properties.BeginInit();
            this.dtCC.Properties.VistaTimeProperties.BeginInit();
            this.dtCC.Properties.BeginInit();
            this.pnStatus.BeginInit();
            this.pnStatus.SuspendLayout();
            ((ISupportInitialize) this.ptFail).BeginInit();
            this.panel2.SuspendLayout();
            this.btFind.Properties.BeginInit();
            this.panel3.SuspendLayout();
            base.SuspendLayout();
            this.lblState.AutoSize = true;
            this.lblState.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lblState.ForeColor = Color.SteelBlue;
            this.lblState.Location = new Point(0x2b, 13);
            this.lblState.Name = "lblState";
            this.lblState.Size = new Size(0x5b, 14);
            this.lblState.TabIndex = 0;
            this.lblState.Text = "Chưa kết nối!";
            this.tabControl1.Controls.Add(this.tabPage1);
            this.tabControl1.Controls.Add(this.tabPage2);
            this.tabControl1.Controls.Add(this.tabPage3);
            this.tabControl1.Location = new Point(0x62, 0xdf);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new Size(0x1ce, 0x73);
            this.tabControl1.TabIndex = 7;
            this.tabPage1.BackColor = Color.WhiteSmoke;
            this.tabPage1.Cursor = Cursors.Default;
            this.tabPage1.ForeColor = Color.DarkBlue;
            this.tabPage1.Location = new Point(4, 0x16);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Padding = new Padding(3);
            this.tabPage1.Size = new Size(0x1c6, 0x59);
            this.tabPage1.TabIndex = 0;
            this.tabPage1.Text = "TCP/IP";
            this.tabPage1.UseVisualStyleBackColor = true;
            this.tabPage2.BackColor = Color.WhiteSmoke;
            this.tabPage2.Controls.Add(this.groupBox5);
            this.tabPage2.Controls.Add(this.btnRsConnect);
            this.tabPage2.ForeColor = Color.DarkBlue;
            this.tabPage2.Location = new Point(4, 0x16);
            this.tabPage2.Name = "tabPage2";
            this.tabPage2.Padding = new Padding(3);
            this.tabPage2.Size = new Size(0x1c6, 0x59);
            this.tabPage2.TabIndex = 1;
            this.tabPage2.Text = "RS232/485";
            this.tabPage2.UseVisualStyleBackColor = true;
            this.groupBox5.Controls.Add(this.cbBaudRate);
            this.groupBox5.Controls.Add(this.label5);
            this.groupBox5.Controls.Add(this.txtMachineSN);
            this.groupBox5.Controls.Add(this.cbPort);
            this.groupBox5.Controls.Add(this.label7);
            this.groupBox5.Controls.Add(this.label6);
            this.groupBox5.Location = new Point(0x11, -1);
            this.groupBox5.Name = "groupBox5";
            this.groupBox5.Size = new Size(0x196, 40);
            this.groupBox5.TabIndex = 12;
            this.groupBox5.TabStop = false;
            this.cbBaudRate.FormattingEnabled = true;
            this.cbBaudRate.Items.AddRange(new object[] { "1200", "2400", "4800", "9600", "19200", "38400", "115200" });
            this.cbBaudRate.Location = new Point(0xbb, 14);
            this.cbBaudRate.Name = "cbBaudRate";
            this.cbBaudRate.Size = new Size(0x41, 0x15);
            this.cbBaudRate.TabIndex = 6;
            this.cbBaudRate.Text = "115200";
            this.label5.AutoSize = true;
            this.label5.Location = new Point(10, 0x12);
            this.label5.Name = "label5";
            this.label5.Size = new Size(0x1b, 13);
            this.label5.TabIndex = 7;
            this.label5.Text = "Port";
            this.txtMachineSN.Location = new Point(0x151, 14);
            this.txtMachineSN.Name = "txtMachineSN";
            this.txtMachineSN.Size = new Size(0x38, 0x15);
            this.txtMachineSN.TabIndex = 10;
            this.txtMachineSN.Text = "1";
            this.cbPort.FormattingEnabled = true;
            this.cbPort.Items.AddRange(new object[] { "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9" });
            this.cbPort.Location = new Point(0x34, 14);
            this.cbPort.Name = "cbPort";
            this.cbPort.Size = new Size(0x38, 0x15);
            this.cbPort.TabIndex = 5;
            this.cbPort.Text = "COM1";
            this.label7.AutoSize = true;
            this.label7.Location = new Point(0x109, 0x12);
            this.label7.Name = "label7";
            this.label7.Size = new Size(0x3b, 13);
            this.label7.TabIndex = 9;
            this.label7.Text = "MachineSN";
            this.label6.AutoSize = true;
            this.label6.Location = new Point(0x79, 0x12);
            this.label6.Name = "label6";
            this.label6.Size = new Size(0x36, 13);
            this.label6.TabIndex = 8;
            this.label6.Text = "BaudRate";
            this.btnRsConnect.Location = new Point(0xb7, 0x2f);
            this.btnRsConnect.Name = "btnRsConnect";
            this.btnRsConnect.Size = new Size(0x4b, 0x17);
            this.btnRsConnect.TabIndex = 11;
            this.btnRsConnect.Text = "Connect";
            this.btnRsConnect.UseVisualStyleBackColor = true;
            this.tabPage3.BackColor = Color.WhiteSmoke;
            this.tabPage3.Controls.Add(this.groupBox4);
            this.tabPage3.Controls.Add(this.btnUSBConnect);
            this.tabPage3.Controls.Add(this.groupBox3);
            this.tabPage3.ForeColor = Color.DarkBlue;
            this.tabPage3.Location = new Point(4, 0x16);
            this.tabPage3.Name = "tabPage3";
            this.tabPage3.Size = new Size(0x1c6, 0x59);
            this.tabPage3.TabIndex = 2;
            this.tabPage3.Text = "USBClient";
            this.tabPage3.UseVisualStyleBackColor = true;
            this.groupBox4.Controls.Add(this.rbVUSB);
            this.groupBox4.Controls.Add(this.label11);
            this.groupBox4.Controls.Add(this.txtMachineSN2);
            this.groupBox4.Location = new Point(0x17, -1);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new Size(0xeb, 0x26);
            this.groupBox4.TabIndex = 7;
            this.groupBox4.TabStop = false;
            this.rbVUSB.AutoSize = true;
            this.rbVUSB.Checked = true;
            this.rbVUSB.Location = new Point(8, 15);
            this.rbVUSB.Name = "rbVUSB";
            this.rbVUSB.Size = new Size(0x68, 0x11);
            this.rbVUSB.TabIndex = 3;
            this.rbVUSB.TabStop = true;
            this.rbVUSB.Text = "Virtual USBClient";
            this.rbVUSB.UseVisualStyleBackColor = true;
            this.label11.AutoSize = true;
            this.label11.Location = new Point(0x8a, 0x11);
            this.label11.Name = "label11";
            this.label11.Size = new Size(0x3b, 13);
            this.label11.TabIndex = 5;
            this.label11.Text = "MachineSN";
            this.txtMachineSN2.BackColor = Color.AliceBlue;
            this.txtMachineSN2.ForeColor = SystemColors.WindowText;
            this.txtMachineSN2.Location = new Point(0xc7, 12);
            this.txtMachineSN2.Name = "txtMachineSN2";
            this.txtMachineSN2.Size = new Size(0x1b, 0x15);
            this.txtMachineSN2.TabIndex = 4;
            this.txtMachineSN2.Text = "1";
            this.btnUSBConnect.Location = new Point(0xb7, 0x2f);
            this.btnUSBConnect.Name = "btnUSBConnect";
            this.btnUSBConnect.Size = new Size(0x4b, 0x17);
            this.btnUSBConnect.TabIndex = 0;
            this.btnUSBConnect.Text = "Connect";
            this.btnUSBConnect.UseVisualStyleBackColor = true;
            this.groupBox3.Controls.Add(this.rbUSB);
            this.groupBox3.Location = new Point(0x18, 0x25);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new Size(0x59, 0x1f);
            this.groupBox3.TabIndex = 6;
            this.groupBox3.TabStop = false;
            this.rbUSB.AutoSize = true;
            this.rbUSB.Location = new Point(7, 11);
            this.rbUSB.Name = "rbUSB";
            this.rbUSB.Size = new Size(0x47, 0x11);
            this.rbUSB.TabIndex = 2;
            this.rbUSB.Text = "USBClient";
            this.rbUSB.UseVisualStyleBackColor = true;
            this.btnGetDeviceStatus.Location = new Point(8, 0x6f);
            this.btnGetDeviceStatus.Name = "btnGetDeviceStatus";
            this.btnGetDeviceStatus.Size = new Size(0x88, 0x17);
            this.btnGetDeviceStatus.TabIndex = 3;
            this.btnGetDeviceStatus.Text = "GetRecordCount";
            this.btnGetDeviceStatus.UseVisualStyleBackColor = true;
            this.btnGetDeviceStatus.Visible = false;
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Last.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0} / {1}";
            this.gcList.Location = new Point(2, 0x16);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new RepositoryItem[] { this.repDate, this.repTime });
            this.gcList.Size = new Size(960, 0x39a);
            this.gcList.TabIndex = 11;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gbList.BorderStyle = BorderStyles.NoBorder;
            this.gbList.Columns.AddRange(new GridColumn[] { this.colEmployeeCode, this.colEnrollNumber, this.colEmployeeName, this.colHour, this.colStateInOut, this.colMachineID, this.colDate });
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "K\x00e9o thả cột bất kỳ v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.EnableAppearanceEvenRow = true;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.ViewCaption = "Dữ Liệu Chấm C\x00f4ng";
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.MouseDown += new MouseEventHandler(this.gbList_MouseDown);
            this.colEmployeeCode.Caption = "M\x00e3 nh\x00e2n vi\x00ean";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.OptionsColumn.ReadOnly = true;
            this.colEmployeeCode.Visible = true;
            this.colEmployeeCode.VisibleIndex = 1;
            this.colEmployeeCode.Width = 0x5d;
            this.colEnrollNumber.AppearanceHeader.Options.UseTextOptions = true;
            this.colEnrollNumber.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.colEnrollNumber.Caption = "M\x00e3 chấm c\x00f4ng";
            this.colEnrollNumber.FieldName = "EnrollNumber";
            this.colEnrollNumber.Name = "colEnrollNumber";
            this.colEnrollNumber.OptionsColumn.ReadOnly = true;
            this.colEnrollNumber.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            this.colEnrollNumber.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;
            this.colEnrollNumber.Visible = true;
            this.colEnrollNumber.VisibleIndex = 0;
            this.colEnrollNumber.Width = 0x70;
            this.colEmployeeName.Caption = "T\x00ean nh\x00e2n vi\x00ean";
            this.colEmployeeName.FieldName = "EmployeeName";
            this.colEmployeeName.Name = "colEmployeeName";
            this.colEmployeeName.OptionsColumn.ReadOnly = true;
            this.colEmployeeName.Visible = true;
            this.colEmployeeName.VisibleIndex = 2;
            this.colEmployeeName.Width = 0xaf;
            this.colHour.AppearanceHeader.Options.UseTextOptions = true;
            this.colHour.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.colHour.Caption = "Thời gian";
            this.colHour.ColumnEdit = this.repTime;
            this.colHour.DisplayFormat.FormatString = "t";
            this.colHour.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
            this.colHour.FieldName = "Hour";
            this.colHour.Name = "colHour";
            this.colHour.OptionsColumn.ReadOnly = true;
            this.colHour.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            this.colHour.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;
            this.colHour.Visible = true;
            this.colHour.VisibleIndex = 4;
            this.colHour.Width = 0x56;
            this.repTime.AutoHeight = false;
            this.repTime.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repTime.Mask.UseMaskAsDisplayFormat = true;
            this.repTime.Name = "repTime";
            this.colStateInOut.AppearanceHeader.Options.UseTextOptions = true;
            this.colStateInOut.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.colStateInOut.Caption = "Ra/V\x00e0o";
            this.colStateInOut.FieldName = "StateInOut";
            this.colStateInOut.Name = "colStateInOut";
            this.colStateInOut.OptionsColumn.ReadOnly = true;
            this.colStateInOut.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            this.colStateInOut.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;
            this.colStateInOut.Visible = true;
            this.colStateInOut.VisibleIndex = 5;
            this.colStateInOut.Width = 0x73;
            this.colMachineID.AppearanceHeader.Options.UseTextOptions = true;
            this.colMachineID.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
            this.colMachineID.Caption = "M\x00e3 m\x00e1y";
            this.colMachineID.FieldName = "MachineID";
            this.colMachineID.Name = "colMachineID";
            this.colMachineID.OptionsColumn.ReadOnly = true;
            this.colMachineID.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            this.colMachineID.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;
            this.colMachineID.Visible = true;
            this.colMachineID.VisibleIndex = 6;
            this.colMachineID.Width = 0x95;
            this.colDate.Caption = "Ng\x00e0y";
            this.colDate.ColumnEdit = this.repDate;
            this.colDate.FieldName = "Date";
            this.colDate.Name = "colDate";
            this.colDate.OptionsColumn.ReadOnly = true;
            this.colDate.Visible = true;
            this.colDate.VisibleIndex = 3;
            this.colDate.Width = 0x55;
            this.repDate.AutoHeight = false;
            this.repDate.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repDate.Mask.UseMaskAsDisplayFormat = true;
            this.repDate.Name = "repDate";
            this.repDate.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.btnGetGeneralLogDataStr.Location = new Point(0x40, 0x15);
            this.btnGetGeneralLogDataStr.Name = "btnGetGeneralLogDataStr";
            this.btnGetGeneralLogDataStr.Size = new Size(0x62, 0x17);
            this.btnGetGeneralLogDataStr.TabIndex = 4;
            this.btnGetGeneralLogDataStr.Text = "GetGeneralLogDataStr";
            this.btnGetGeneralLogDataStr.UseVisualStyleBackColor = true;
            this.btnGetGeneralLogDataStr.Visible = false;
            this.label9.AutoSize = true;
            this.label9.ForeColor = Color.Red;
            this.label9.Location = new Point(0xae, 0x4d);
            this.label9.Name = "label9";
            this.label9.Size = new Size(0x6b, 13);
            this.label9.TabIndex = 10;
            this.label9.Text = "Get the total of logs.";
            this.label9.Visible = false;
            this.label4.AutoSize = true;
            this.label4.ForeColor = Color.Red;
            this.label4.Location = new Point(0xae, 0x19);
            this.label4.Name = "label4";
            this.label4.Size = new Size(0x9e, 13);
            this.label4.TabIndex = 8;
            this.label4.Text = "Get attendance logs by strings.";
            this.label4.Visible = false;
            this.btnGetGeneralExtLogData.Location = new Point(0x40, 0x2f);
            this.btnGetGeneralExtLogData.Name = "btnGetGeneralExtLogData";
            this.btnGetGeneralExtLogData.Size = new Size(0x62, 0x17);
            this.btnGetGeneralExtLogData.TabIndex = 5;
            this.btnGetGeneralExtLogData.Text = "GetGeneralExtLogData";
            this.btnGetGeneralExtLogData.UseVisualStyleBackColor = true;
            this.btnGetGeneralExtLogData.Visible = false;
            this.label8.AutoSize = true;
            this.label8.ForeColor = Color.Red;
            this.label8.Location = new Point(0xaf, 0x33);
            this.label8.Name = "label8";
            this.label8.Size = new Size(0x9d, 13);
            this.label8.TabIndex = 9;
            this.label8.Text = "Get extended attendance logs.";
            this.label8.Visible = false;
            this.alertControl1.AllowHtmlText = true;
            this.alertControl1.AutoFormDelay = 0x1388;
            button.Hint = "Xem";
            button.ImageIndex = 0;
            button.Name = "alertView";
            button2.Hint = "Thiết Lập";
            button2.ImageIndex = 2;
            button2.Name = "alertConfig";
            this.alertControl1.Buttons.Add(button);
            this.alertControl1.Buttons.Add(button2);
            this.alertControl1.PopupMenu = this.popupMenu1;
            this.alertControl1.ButtonClick += new AlertButtonClickEventHandler(this.alertControl1_ButtonClick);
            this.popupMenu1.Name = "popupMenu1";
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.lbTotal, this.bbiConnect, this.bbiGetGeneralLogData, this.bbiExport, this.bbeCC, this.bbiClose, this.bbeCCTo, this.bbiImport, this.bbiImportText, this.bbiUpdate });
            this.barManager1.MaxItemId = 0x13;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit1, this.repositoryItemTextEdit2, this.repositoryItemDateEdit1, this.repositoryItemComboBox1, this.repositoryItemDateEdit2, this.repMachine });
            this.bar1.BarName = "Custom 3";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiConnect, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeCC, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeCCTo, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiGetGeneralLogData, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiUpdate, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiImport, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiImportText, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Custom 3";
            this.bbiConnect.Caption = "Kết Nối Tất Cả Thiết Bị";
            this.bbiConnect.Id = 3;
            this.bbiConnect.ImageIndex = 0x27;
            this.bbiConnect.Name = "bbiConnect";
            this.bbiConnect.ItemClick += new ItemClickEventHandler(this.bbiConnect_ItemClick);
            this.bbeCC.Caption = "Từ Ng\x00e0y:";
            this.bbeCC.Edit = this.repositoryItemDateEdit1;
            this.bbeCC.Enabled = false;
            this.bbeCC.Id = 9;
            this.bbeCC.Name = "bbeCC";
            this.bbeCC.Width = 90;
            this.bbeCC.EditValueChanged += new EventHandler(this.bbeCC_EditValueChanged);
            this.repositoryItemDateEdit1.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemDateEdit1.Appearance.Options.UseFont = true;
            this.repositoryItemDateEdit1.AutoHeight = false;
            this.repositoryItemDateEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemDateEdit1.Name = "repositoryItemDateEdit1";
            this.repositoryItemDateEdit1.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.bbeCCTo.Caption = "Đến Ng\x00e0y:";
            this.bbeCCTo.Edit = this.repositoryItemDateEdit2;
            this.bbeCCTo.Enabled = false;
            this.bbeCCTo.Id = 12;
            this.bbeCCTo.Name = "bbeCCTo";
            this.bbeCCTo.Width = 90;
            this.bbeCCTo.EditValueChanged += new EventHandler(this.bbeCCTo_EditValueChanged);
            this.repositoryItemDateEdit2.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemDateEdit2.Appearance.Options.UseFont = true;
            this.repositoryItemDateEdit2.AutoHeight = false;
            this.repositoryItemDateEdit2.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemDateEdit2.Name = "repositoryItemDateEdit2";
            this.repositoryItemDateEdit2.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.bbiGetGeneralLogData.Caption = "Tải Dữ Liệu";
            this.bbiGetGeneralLogData.Id = 4;
            this.bbiGetGeneralLogData.ImageIndex = 0x2a;
            this.bbiGetGeneralLogData.Name = "bbiGetGeneralLogData";
            this.bbiGetGeneralLogData.ItemClick += new ItemClickEventHandler(this.bbiGetGeneralLogData_ItemClick);
            this.bbiUpdate.Caption = "Cập Nhật V\x00e0o Bảng Chấm C\x00f4ng Th\x00e1ng";
            this.bbiUpdate.Id = 0x12;
            this.bbiUpdate.ImageIndex = 12;
            this.bbiUpdate.Name = "bbiUpdate";
            this.bbiUpdate.ItemClick += new ItemClickEventHandler(this.bbiUpdate_ItemClick);
            this.bbiImport.Caption = "Nạp Từ Tập Tin Excel";
            this.bbiImport.Id = 14;
            this.bbiImport.ImageIndex = 0x38;
            this.bbiImport.Name = "bbiImport";
            this.bbiImport.ItemClick += new ItemClickEventHandler(this.bbiImport_ItemClick);
            this.bbiImportText.Caption = "Nạp Từ Tập Tin Text";
            this.bbiImportText.Id = 15;
            this.bbiImportText.ImageIndex = 0x21;
            this.bbiImportText.Name = "bbiImportText";
            this.bbiImportText.ItemClick += new ItemClickEventHandler(this.bbiImportText_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 7;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 11;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.lbTotal.Id = 0;
            this.lbTotal.Name = "lbTotal";
            this.lbTotal.TextAlignment = StringAlignment.Near;
            this.repositoryItemTextEdit1.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemTextEdit1.Appearance.Options.UseFont = true;
            this.repositoryItemTextEdit1.AutoHeight = false;
            this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
            this.repositoryItemTextEdit2.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemTextEdit2.Appearance.Options.UseFont = true;
            this.repositoryItemTextEdit2.AutoHeight = false;
            this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2";
            this.repositoryItemComboBox1.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemComboBox1.Appearance.Options.UseFont = true;
            this.repositoryItemComboBox1.AutoHeight = false;
            this.repositoryItemComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemComboBox1.Name = "repositoryItemComboBox1";
            this.repositoryItemComboBox1.ReadOnly = true;
            this.repMachine.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repMachine.Appearance.Options.UseFont = true;
            this.repMachine.AutoHeight = false;
            this.repMachine.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo), new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, ImageLocation.MiddleCenter, (Image) manager.GetObject("repMachine.Buttons"), new KeyShortcut(Keys.None), appearance, "", null, null, true) });
            this.repMachine.Name = "repMachine";
            this.repMachine.NullText = "<Chọn>";
            this.repMachine.View = this.repositoryItemGridLookUpEdit1View;
            this.repositoryItemGridLookUpEdit1View.Columns.AddRange(new GridColumn[] { this.colMachineCode, this.colMachineName });
            this.repositoryItemGridLookUpEdit1View.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.repositoryItemGridLookUpEdit1View.Name = "repositoryItemGridLookUpEdit1View";
            this.repositoryItemGridLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.repositoryItemGridLookUpEdit1View.OptionsView.ShowGroupPanel = false;
            this.colMachineCode.Caption = "M\x00e3 m\x00e1y";
            this.colMachineCode.FieldName = "MachineCode";
            this.colMachineCode.Name = "colMachineCode";
            this.colMachineCode.Visible = true;
            this.colMachineCode.VisibleIndex = 0;
            this.colMachineName.Caption = "T\x00ean m\x00e1y";
            this.colMachineName.FieldName = "MachineName";
            this.colMachineName.Name = "colMachineName";
            this.colMachineName.Visible = true;
            this.colMachineName.VisibleIndex = 1;
            this.grTimesheetsData.Controls.Add(this.lbStatus);
            this.grTimesheetsData.Controls.Add(this.gcList);
            this.grTimesheetsData.Controls.Add(this.label4);
            this.grTimesheetsData.Controls.Add(this.tabControl1);
            this.grTimesheetsData.Controls.Add(this.btnGetGeneralLogDataStr);
            this.grTimesheetsData.Controls.Add(this.label8);
            this.grTimesheetsData.Controls.Add(this.label9);
            this.grTimesheetsData.Controls.Add(this.btnGetGeneralExtLogData);
            this.grTimesheetsData.Controls.Add(this.btnGetDeviceStatus);
            this.grTimesheetsData.Dock = DockStyle.Fill;
            this.grTimesheetsData.Location = new Point(0, 0);
            this.grTimesheetsData.Name = "grTimesheetsData";
            this.grTimesheetsData.Size = new Size(0x3c4, 0x3b2);
            this.grTimesheetsData.TabIndex = 0;
            this.grTimesheetsData.Text = "Dữ Liệu Chấm C\x00f4ng";
            this.lbStatus.AllowHtmlString = true;
            this.lbStatus.Location = new Point(0x71, 4);
            this.lbStatus.Name = "lbStatus";
            this.lbStatus.Size = new Size(0, 0);
            this.lbStatus.TabIndex = 0x1f;
            this.btImportText.ImageIndex = 0x1f;
            this.btImportText.ImageList = this.imageCollection2;
            this.btImportText.Location = new Point(12, 0xec);
            this.btImportText.Name = "btImportText";
            this.btImportText.Size = new Size(0xe8, 0x17);
            this.btImportText.TabIndex = 0x1a;
            this.btImportText.Text = "Nạp Dữ Liệu Từ Tập Tin Text (*.txt)";
            this.btImportText.Click += new EventHandler(this.btImportText_Click);
            this.btMachine.ImageIndex = 0x3b;
            this.btMachine.ImageList = this.imageCollection2;
            this.btMachine.Location = new Point(12, 0x48);
            this.btMachine.Name = "btMachine";
            this.btMachine.Size = new Size(0xe8, 0x17);
            this.btMachine.TabIndex = 0x19;
            this.btMachine.Text = "Danh S\x00e1ch Thiết Bị (M\x00e1y Chấm C\x00f4ng)";
            this.btMachine.Click += new EventHandler(this.btMachine_Click);
            this.btUpdate.ImageIndex = 12;
            this.btUpdate.ImageList = this.imageCollection2;
            this.btUpdate.Location = new Point(12, 360);
            this.btUpdate.Name = "btUpdate";
            this.btUpdate.Size = new Size(0xe8, 0x17);
            this.btUpdate.TabIndex = 0x18;
            this.btUpdate.Text = "Cập Nhật V\x00e0o Bảng Chấm C\x00f4ng Th\x00e1ng";
            this.btUpdate.Click += new EventHandler(this.btUpdate_Click);
            this.btImport.ImageIndex = 0x38;
            this.btImport.ImageList = this.imageCollection2;
            this.btImport.Location = new Point(12, 0xc9);
            this.btImport.Name = "btImport";
            this.btImport.Size = new Size(0xe8, 0x17);
            this.btImport.TabIndex = 0x17;
            this.btImport.Text = "Nạp Dữ Liệu Từ Tập Tin Excel (*.xls)";
            this.btImport.Click += new EventHandler(this.btImport_Click);
            this.btSaveConfig.ImageIndex = 10;
            this.btSaveConfig.ImageList = this.imageCollection2;
            this.btSaveConfig.Location = new Point(12, 0x293);
            this.btSaveConfig.Name = "btSaveConfig";
            this.btSaveConfig.Size = new Size(0xe8, 0x17);
            this.btSaveConfig.TabIndex = 0x15;
            this.btSaveConfig.Text = "Lưu T\x00f9y Chỉnh";
            this.btSaveConfig.Click += new EventHandler(this.btSaveConfig_Click);
            this.grOption.Controls.Add(this.checkConnect);
            this.grOption.Controls.Add(this.checkFilter);
            this.grOption.Controls.Add(this.checkAlert);
            this.grOption.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.grOption.ForeColor = Color.Blue;
            this.grOption.Location = new Point(12, 0x1e5);
            this.grOption.Name = "grOption";
            this.grOption.Size = new Size(0xe8, 160);
            this.grOption.TabIndex = 20;
            this.grOption.TabStop = false;
            this.grOption.Text = "T\x00f9y chỉnh";
            this.checkConnect.Enabled = false;
            this.checkConnect.Location = new Point(14, 0x49);
            this.checkConnect.Name = "checkConnect";
            this.checkConnect.Properties.Appearance.Options.UseTextOptions = true;
            this.checkConnect.Properties.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.checkConnect.Properties.Caption = "Tự động kết nối với thiết bị (m\x00e1y chấm c\x00f4ng) khi mở chức năng n\x00e0y";
            this.checkConnect.Size = new Size(0xd4, 0x1f);
            tip.AllowHtmlText = DefaultBoolean.True;
            item.Text = "Hướng dẫn";
            item2.LeftIndent = 6;
            item2.Text = "Tự động kết nối m\x00e1y chấm c\x00f4ng khi phần mềm chạy .";
            item4.LeftIndent = 6;
            item4.Text = "                                               <color=blue>www.perfect.com.vn";
            tip.Items.Add(item);
            tip.Items.Add(item2);
            tip.Items.Add(item3);
            tip.Items.Add(item4);
            this.checkConnect.SuperTip = tip;
            this.checkConnect.TabIndex = 11;
            this.checkFilter.Location = new Point(14, 0x17);
            this.checkFilter.Name = "checkFilter";
            this.checkFilter.Properties.Appearance.Options.UseTextOptions = true;
            this.checkFilter.Properties.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.checkFilter.Properties.Caption = "Tải dữ liệu theo ng\x00e0y chọn (nếu bỏ chọn phần mềm sẽ tải to\x00e0n bộ dữ liệu chấm c\x00f4ng về m\x00e1y)";
            this.checkFilter.Size = new Size(0xd4, 0x2c);
            tip2.AllowHtmlText = DefaultBoolean.True;
            item5.Text = "Hướng dẫn";
            item6.LeftIndent = 6;
            item6.Text = "+ Hiển thị theo ng\x00e0y ( chọn )\r\n\r\n+ Hiễn thị tất cả dữ liệu ( kh\x00f4ng chọn )";
            item8.LeftIndent = 6;
            item8.Text = "                         <color=blue>www.perfect.com.vn";
            tip2.Items.Add(item5);
            tip2.Items.Add(item6);
            tip2.Items.Add(item7);
            tip2.Items.Add(item8);
            this.checkFilter.SuperTip = tip2;
            this.checkFilter.TabIndex = 10;
            this.checkFilter.CheckedChanged += new EventHandler(this.checkFilter_CheckedChanged);
            this.checkAlert.Location = new Point(14, 0x72);
            this.checkAlert.Name = "checkAlert";
            this.checkAlert.Properties.Appearance.Options.UseTextOptions = true;
            this.checkAlert.Properties.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.checkAlert.Properties.Caption = "Hiện th\x00f4ng b\x00e1o khi nh\x00e2n vi\x00ean đi ra, đi v\x00e0o (thiết bị phải ở trạng th\x00e1i kết nối)";
            this.checkAlert.Size = new Size(0xd4, 0x1f);
            tip3.AllowHtmlText = DefaultBoolean.True;
            item9.Text = "Hướng dẫn";
            item10.LeftIndent = 6;
            item10.Text = "Hiển thị th\x00f4ng b\x00e1o ở g\x00f3c phải b\x00ean dưới m\x00e0n h\x00ecnh khi c\x00f3 dữ liệu chấm c\x00f4ng mới .";
            item12.LeftIndent = 6;
            item12.Text = "                                                             <color=blue>www.perfect.com.vn";
            tip3.Items.Add(item9);
            tip3.Items.Add(item10);
            tip3.Items.Add(item11);
            tip3.Items.Add(item12);
            this.checkAlert.SuperTip = tip3;
            this.checkAlert.TabIndex = 8;
            this.ptSuccess.Image = MsgResc.sucess;
            this.ptSuccess.Location = new Point(9, 5);
            this.ptSuccess.Name = "ptSuccess";
            this.ptSuccess.Size = new Size(0x20, 0x20);
            this.ptSuccess.SizeMode = PictureBoxSizeMode.AutoSize;
            this.ptSuccess.TabIndex = 3;
            this.ptSuccess.TabStop = false;
            this.splitContainerControl1.Dock = DockStyle.Fill;
            this.splitContainerControl1.Location = new Point(0, 0x1a);
            this.splitContainerControl1.Name = "splitContainerControl1";
            this.splitContainerControl1.Panel1.Controls.Add(this.groupConnectInformation);
            this.splitContainerControl1.Panel1.Text = "Panel1";
            this.splitContainerControl1.Panel2.Controls.Add(this.grTimesheetsData);
            this.splitContainerControl1.Panel2.Text = "Panel2";
            this.splitContainerControl1.Size = new Size(0x4dc, 0x3b2);
            this.splitContainerControl1.SplitterPosition = 0x112;
            this.splitContainerControl1.TabIndex = 0x13;
            this.splitContainerControl1.Text = "splitContainerControl1";
            this.groupConnectInformation.Controls.Add(this.xtraScrollableControl1);
            this.groupConnectInformation.Dock = DockStyle.Fill;
            this.groupConnectInformation.Location = new Point(0, 0);
            this.groupConnectInformation.Name = "groupConnectInformation";
            this.groupConnectInformation.Size = new Size(0x112, 0x3b2);
            this.groupConnectInformation.TabIndex = 0;
            this.groupConnectInformation.Text = "Th\x00f4ng Tin Kết Nối";
            this.xtraScrollableControl1.Controls.Add(this.panel1);
            this.xtraScrollableControl1.Controls.Add(this.pnStatus);
            this.xtraScrollableControl1.Controls.Add(this.flowMachineItem);
            this.xtraScrollableControl1.Controls.Add(this.panel2);
            this.xtraScrollableControl1.Controls.Add(this.panel3);
            this.xtraScrollableControl1.Dock = DockStyle.Fill;
            this.xtraScrollableControl1.Location = new Point(2, 0x16);
            this.xtraScrollableControl1.Name = "xtraScrollableControl1";
            this.xtraScrollableControl1.Size = new Size(270, 0x39a);
            this.xtraScrollableControl1.TabIndex = 0;
            this.xtraScrollableControl1.SizeChanged += new EventHandler(this.xtraScrollableControl1_SizeChanged);
            this.panel1.Controls.Add(this.labelControl12);
            this.panel1.Controls.Add(this.labelControl11);
            this.panel1.Controls.Add(this.labelControl10);
            this.panel1.Controls.Add(this.labelControl7);
            this.panel1.Controls.Add(this.btGetGeneralLogData);
            this.panel1.Controls.Add(this.dtCCTo);
            this.panel1.Controls.Add(this.labelControl6);
            this.panel1.Controls.Add(this.labelControl5);
            this.panel1.Controls.Add(this.dtCC);
            this.panel1.Controls.Add(this.labelControl4);
            this.panel1.Controls.Add(this.labelControl3);
            this.panel1.Controls.Add(this.btImportText);
            this.panel1.Controls.Add(this.grOption);
            this.panel1.Controls.Add(this.btUpdate);
            this.panel1.Controls.Add(this.btSaveConfig);
            this.panel1.Controls.Add(this.btImport);
            this.panel1.Dock = DockStyle.Top;
            this.panel1.Location = new Point(0, 0xc7);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(270, 0x2ba);
            this.panel1.TabIndex = 12;
            this.labelControl12.AllowHtmlString = true;
            this.labelControl12.Appearance.Options.UseTextOptions = true;
            this.labelControl12.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl12.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl12.Location = new Point(12, 390);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new Size(0xe8, 0x4c);
            this.labelControl12.TabIndex = 0x25;
            this.labelControl12.Text = manager.GetString("labelControl12.Text");
            this.labelControl11.Appearance.Options.UseTextOptions = true;
            this.labelControl11.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl11.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl11.Location = new Point(12, 0x22);
            this.labelControl11.Name = "labelControl11";
            this.labelControl11.Size = new Size(0xe5, 0x22);
            this.labelControl11.TabIndex = 0x24;
            this.labelControl11.Text = "Chọn từ ng\x00e0y đến ng\x00e0y để tải dữ liệu chấm c\x00f4ng về m\x00e1y";
            this.labelControl10.Appearance.Options.UseTextOptions = true;
            this.labelControl10.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl10.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl10.Location = new Point(12, 320);
            this.labelControl10.Name = "labelControl10";
            this.labelControl10.Size = new Size(0xe8, 0x22);
            this.labelControl10.TabIndex = 0x23;
            this.labelControl10.Text = "Nhấn v\x00e0o n\x00fat b\x00ean dưới để cập nhật dữ liệu chấm c\x00f4ng đ\x00e3 tải về v\x00e0o bảng chấm c\x00f4ng th\x00e1ng";
            this.labelControl7.Appearance.Font = new Font("Tahoma", 11f, FontStyle.Bold);
            this.labelControl7.Appearance.ForeColor = Color.Black;
            this.labelControl7.Appearance.Options.UseFont = true;
            this.labelControl7.Appearance.Options.UseForeColor = true;
            this.labelControl7.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl7.Location = new Point(12, 170);
            this.labelControl7.Margin = new Padding(3, 3, 3, 6);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new Size(0xd5, 0x16);
            this.labelControl7.TabIndex = 0x22;
            this.labelControl7.Text = "hoặc";
            this.btGetGeneralLogData.ImageIndex = 0x2a;
            this.btGetGeneralLogData.ImageList = this.imageCollection2;
            this.btGetGeneralLogData.Location = new Point(12, 0x8a);
            this.btGetGeneralLogData.Name = "btGetGeneralLogData";
            this.btGetGeneralLogData.Size = new Size(0xe8, 0x17);
            this.btGetGeneralLogData.TabIndex = 0x21;
            this.btGetGeneralLogData.Text = "Tải Dữ Liệu";
            this.btGetGeneralLogData.Click += new EventHandler(this.btGetGeneralLogData_Click);
            this.dtCCTo.EditValue = null;
            this.dtCCTo.Enabled = false;
            this.dtCCTo.Location = new Point(0x47, 0x69);
            this.dtCCTo.Name = "dtCCTo";
            this.dtCCTo.Properties.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.dtCCTo.Properties.Appearance.Options.UseFont = true;
            this.dtCCTo.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtCCTo.Properties.Mask.EditMask = "dd/MM/yyyy";
            this.dtCCTo.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.dtCCTo.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtCCTo.Size = new Size(0xad, 20);
            this.dtCCTo.TabIndex = 0x20;
            this.dtCCTo.EditValueChanged += new EventHandler(this.dtCCTo_EditValueChanged);
            this.labelControl6.Location = new Point(12, 0x6c);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new Size(0x33, 13);
            this.labelControl6.TabIndex = 0x1f;
            this.labelControl6.Text = "Đến ng\x00e0y:";
            this.labelControl5.Location = new Point(12, 0x4d);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new Size(0x2c, 13);
            this.labelControl5.TabIndex = 30;
            this.labelControl5.Text = "Từ ng\x00e0y:";
            this.dtCC.EditValue = null;
            this.dtCC.Enabled = false;
            this.dtCC.Location = new Point(0x47, 0x4a);
            this.dtCC.Name = "dtCC";
            this.dtCC.Properties.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.dtCC.Properties.Appearance.Options.UseFont = true;
            this.dtCC.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.dtCC.Properties.Mask.EditMask = "dd/MM/yyyy";
            this.dtCC.Properties.Mask.UseMaskAsDisplayFormat = true;
            this.dtCC.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.dtCC.Size = new Size(0xad, 20);
            this.dtCC.TabIndex = 0x1d;
            this.dtCC.EditValueChanged += new EventHandler(this.dtCC_EditValueChanged);
            this.labelControl4.Appearance.Font = new Font("Tahoma", 11f, FontStyle.Bold);
            this.labelControl4.Appearance.ForeColor = Color.Black;
            this.labelControl4.Appearance.Options.UseFont = true;
            this.labelControl4.Appearance.Options.UseForeColor = true;
            this.labelControl4.Appearance.Options.UseTextOptions = true;
            this.labelControl4.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl4.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl4.Location = new Point(12, 0x119);
            this.labelControl4.Margin = new Padding(3, 3, 3, 6);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new Size(0xe8, 0x29);
            this.labelControl4.TabIndex = 0x1c;
            this.labelControl4.Text = "4. Cập nhật dữ liệu v\x00e0o bảng chấm c\x00f4ng th\x00e1ng";
            this.labelControl3.Appearance.Font = new Font("Tahoma", 11f, FontStyle.Bold);
            this.labelControl3.Appearance.ForeColor = Color.Black;
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Appearance.Options.UseForeColor = true;
            this.labelControl3.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl3.Location = new Point(10, 12);
            this.labelControl3.Margin = new Padding(3, 3, 3, 6);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new Size(0xd5, 0x16);
            this.labelControl3.TabIndex = 0x1b;
            this.labelControl3.Text = "3. Tải dữ liệu chấm c\x00f4ng";
            this.pnStatus.Appearance.BackColor = Color.Transparent;
            this.pnStatus.Appearance.Options.UseBackColor = true;
            this.pnStatus.BorderStyle = BorderStyles.NoBorder;
            this.pnStatus.Controls.Add(this.ptSuccess);
            this.pnStatus.Controls.Add(this.ptFail);
            this.pnStatus.Controls.Add(this.lblState);
            this.pnStatus.Dock = DockStyle.Top;
            this.pnStatus.Location = new Point(0, 0xc7);
            this.pnStatus.MaximumSize = new Size(0, 0x2a);
            this.pnStatus.Name = "pnStatus";
            this.pnStatus.Size = new Size(270, 0);
            this.pnStatus.TabIndex = 0;
            this.ptFail.Image = MsgResc.fail;
            this.ptFail.Location = new Point(9, 5);
            this.ptFail.Name = "ptFail";
            this.ptFail.Size = new Size(0x20, 0x20);
            this.ptFail.SizeMode = PictureBoxSizeMode.AutoSize;
            this.ptFail.TabIndex = 15;
            this.ptFail.TabStop = false;
            this.flowMachineItem.AutoSize = true;
            this.flowMachineItem.Dock = DockStyle.Top;
            this.flowMachineItem.Location = new Point(0, 0xbb);
            this.flowMachineItem.Name = "flowMachineItem";
            this.flowMachineItem.Padding = new Padding(10, 2, 10, 10);
            this.flowMachineItem.Size = new Size(270, 12);
            this.flowMachineItem.TabIndex = 2;
            this.panel2.Controls.Add(this.labelControl9);
            this.panel2.Controls.Add(this.btFind);
            this.panel2.Controls.Add(this.labelControl1);
            this.panel2.Dock = DockStyle.Top;
            this.panel2.Location = new Point(0, 0x70);
            this.panel2.Name = "panel2";
            this.panel2.Size = new Size(270, 0x4b);
            this.panel2.TabIndex = 12;
            this.labelControl9.AllowHtmlString = true;
            this.labelControl9.Appearance.Options.UseTextOptions = true;
            this.labelControl9.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl9.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl9.Location = new Point(12, 0x24);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new Size(230, 0x22);
            this.labelControl9.TabIndex = 0x20;
            this.labelControl9.Text = "Nhấn chuột tr\x00e1i v\x00e0o thiết bị cần kết nối, chọn chức năng <b>Kết nối</b> để kết nối với thiết bị";
            this.btFind.Cursor = Cursors.Hand;
            this.btFind.EditValue = MsgResc.filter;
            this.btFind.Location = new Point(0xba, 11);
            this.btFind.MenuManager = this.barManager1;
            this.btFind.Name = "btFind";
            this.btFind.Properties.Appearance.BackColor = Color.Transparent;
            this.btFind.Properties.Appearance.Options.UseBackColor = true;
            this.btFind.Properties.BorderStyle = BorderStyles.NoBorder;
            this.btFind.Properties.SizeMode = PictureSizeMode.Zoom;
            this.btFind.Size = new Size(0x1a, 0x16);
            this.btFind.TabIndex = 1;
            this.btFind.Click += new EventHandler(this.btFind_Click);
            this.labelControl1.Appearance.Font = new Font("Tahoma", 11f, FontStyle.Bold);
            this.labelControl1.Appearance.ForeColor = Color.Black;
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Appearance.Options.UseForeColor = true;
            this.labelControl1.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl1.Location = new Point(10, 8);
            this.labelControl1.Margin = new Padding(3, 3, 3, 6);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(170, 0x16);
            this.labelControl1.TabIndex = 0;
            this.labelControl1.Text = "2. Kết nối với thiết bị";
            this.panel3.Controls.Add(this.labelControl8);
            this.panel3.Controls.Add(this.labelControl2);
            this.panel3.Controls.Add(this.btMachine);
            this.panel3.Dock = DockStyle.Top;
            this.panel3.Location = new Point(0, 0);
            this.panel3.Name = "panel3";
            this.panel3.Size = new Size(270, 0x70);
            this.panel3.TabIndex = 13;
            this.labelControl8.Appearance.Options.UseTextOptions = true;
            this.labelControl8.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
            this.labelControl8.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl8.Location = new Point(12, 0x20);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new Size(0xe8, 0x22);
            this.labelControl8.TabIndex = 0x1f;
            this.labelControl8.Text = "Nhấn v\x00e0o n\x00fat b\x00ean dưới để mở cửa sổ khai b\x00e1o danh s\x00e1ch thiết bị (m\x00e1y chấm c\x00f4ng)";
            this.labelControl2.Appearance.Font = new Font("Tahoma", 11f, FontStyle.Bold);
            this.labelControl2.Appearance.ForeColor = Color.Black;
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Appearance.Options.UseForeColor = true;
            this.labelControl2.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl2.Location = new Point(12, 10);
            this.labelControl2.Margin = new Padding(3, 3, 3, 6);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new Size(150, 0x16);
            this.labelControl2.TabIndex = 0x1a;
            this.labelControl2.Text = "1. Khai b\x00e1o thiết bị";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.splitContainerControl1);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucAtt";
            base.Size = new Size(0x4dc, 0x3cc);
            base.Load += new EventHandler(this.xucAtt_Load);
            this.tabControl1.ResumeLayout(false);
            this.tabPage2.ResumeLayout(false);
            this.groupBox5.ResumeLayout(false);
            this.groupBox5.PerformLayout();
            this.tabPage3.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.repTime.EndInit();
            this.repDate.VistaTimeProperties.EndInit();
            this.repDate.EndInit();
            this.popupMenu1.EndInit();
            this.barManager1.EndInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.EndInit();
            this.repositoryItemDateEdit1.EndInit();
            this.repositoryItemDateEdit2.VistaTimeProperties.EndInit();
            this.repositoryItemDateEdit2.EndInit();
            this.imageCollection2.EndInit();
            this.repositoryItemTextEdit1.EndInit();
            this.repositoryItemTextEdit2.EndInit();
            this.repositoryItemComboBox1.EndInit();
            this.repMachine.EndInit();
            this.repositoryItemGridLookUpEdit1View.EndInit();
            this.grTimesheetsData.EndInit();
            this.grTimesheetsData.ResumeLayout(false);
            this.grTimesheetsData.PerformLayout();
            this.grOption.ResumeLayout(false);
            this.checkConnect.Properties.EndInit();
            this.checkFilter.Properties.EndInit();
            this.checkAlert.Properties.EndInit();
            ((ISupportInitialize) this.ptSuccess).EndInit();
            this.splitContainerControl1.EndInit();
            this.splitContainerControl1.ResumeLayout(false);
            this.groupConnectInformation.EndInit();
            this.groupConnectInformation.ResumeLayout(false);
            this.xtraScrollableControl1.ResumeLayout(false);
            this.xtraScrollableControl1.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.dtCCTo.Properties.VistaTimeProperties.EndInit();
            this.dtCCTo.Properties.EndInit();
            this.dtCC.Properties.VistaTimeProperties.EndInit();
            this.dtCC.Properties.EndInit();
            this.pnStatus.EndInit();
            this.pnStatus.ResumeLayout(false);
            this.pnStatus.PerformLayout();
            ((ISupportInitialize) this.ptFail).EndInit();
            this.panel2.ResumeLayout(false);
            this.btFind.Properties.EndInit();
            this.panel3.ResumeLayout(false);
            base.ResumeLayout(false);
        }

        private void InitMachine()
        {
            DIC_MACHINE dic_machine = new DIC_MACHINE();
            foreach (DataRow row in dic_machine.GetList().Rows)
            {
                DIC_MACHINE machine = new DIC_MACHINE();
                machine.Get(row["MachineCode"].ToString());
                this.InitOneMachine(machine);
            }
        }

        private void InitOneMachine(DIC_MACHINE Machine)
        {
            int password = 0;
            try
            {
                password = int.Parse(Machine.Password);
            }
            catch
            {
                password = 0;
            }
            xucMachineItem item = new xucMachineItem(Machine.MachineCode, Machine.MachineName, Machine.IP, Machine.PortID, password);
            item.ConnectError += new xucMachineItem.ConnectErrorEventHander(this.machineItem_ConnectError);
            item.ConnectComplete += new xucMachineItem.ConnectCompleteEventHander(this.machineItem_ConnectComplete);
            item.DisConnectComplete += new xucMachineItem.DisConnectCompleteEventHander(this.machineItem_DisConnectComplete);
            item.AddRowEvent += new xucMachineItem.AddRowEventHandler(this.machineItem_AddRowEvent);
            item.OnTransactionEvent += new xucMachineItem.OnTransactionEventHandler(this.machineItem_OnTransactionEvent);
            item.Dock = DockStyle.Top;
            item.Width = this.flowMachineItem.Width - 0x26;
            this.flowMachineItem.Controls.Add(item);
        }

        private void InitOption()
        {
            try
            {
                DataSet set = new DataSet();
                set.ReadXml(this.option);
                this.checkAlert.Checked = Convert.ToBoolean(set.Tables[0].Rows[0][0].ToString());
                this.checkFilter.Checked = Convert.ToBoolean(set.Tables[0].Rows[0][1].ToString());
                this.checkConnect.Checked = Convert.ToBoolean(set.Tables[0].Rows[0][2].ToString());
            }
            catch
            {
            }
            if (this.checkConnect.Checked)
            {
                this.ConnectMultipleDevice();
            }
        }

        private void InvokeCall()
        {
            CallEventHandler call = this.Call;
            if (call != null)
            {
                call();
            }
        }

        private bool IsExistEnrollDataTable(string EnrollNumber)
        {
            bool flag = false;
            foreach (DataRow row in this.EnrollDataTable.Rows)
            {
                if (row["EnrollNumber"].ToString() == EnrollNumber)
                {
                    flag = true;
                }
            }
            return flag;
        }

        private void LoadInterface()
        {
            this.Cursor = Cursors.Default;
            this.groupConnectInformation.Text = "Đang Kết Nối: " + this.m_CountConnectDeviceSuccess + " (M\x00e1y)";
            this.groupConnectInformation.Refresh();
            if (this.m_CountConnectDeviceSuccess == 0)
            {
                this.bbiConnect.Caption = "Kết Nối Tất Cả Thiết Bị";
                this.bbiConnect.ImageIndex = 0x27;
                this.bbiConnect.Refresh();
                this.bbeCC.Enabled = false;
                this.bbeCCTo.Enabled = false;
                this.dtCC.Enabled = false;
                this.dtCCTo.Enabled = false;
            }
            else
            {
                this.bbiConnect.Caption = "Ngắt Kết Nối Tất Cả";
                this.bbiConnect.ImageIndex = 0x26;
                this.bbiConnect.Refresh();
                this.bbeCC.Enabled = true;
                this.bbeCCTo.Enabled = true;
                this.dtCC.Enabled = true;
                this.dtCCTo.Enabled = true;
            }
        }

        private void machineItem_AddRowEvent(object sender, string EnrollNumber, string EmployeeCode, string EmployeeName, System.DateTime Date, System.DateTime Hour, int StateInOut, int MachineID)
        {
            this.m_RowRefresh++;
            if (this.m_RowRefresh == 10)
            {
                this.gcList.Refresh();
                this.m_RowRefresh = 0;
            }
            this.gbList.AddNewRow();
            this.gbList.SetFocusedRowCellValue(this.colEnrollNumber, EnrollNumber);
            this.gbList.SetFocusedRowCellValue(this.colEmployeeCode, EmployeeCode);
            this.gbList.SetFocusedRowCellValue(this.colEmployeeName, EmployeeName);
            this.gbList.SetFocusedRowCellValue(this.colStateInOut, StateInOut);
            this.gbList.SetFocusedRowCellValue(this.colMachineID, MachineID);
            this.gbList.SetFocusedRowCellValue(this.colHour, Hour);
            this.gbList.SetFocusedRowCellValue(this.colDate, Date);
        }

        private void machineItem_ConnectComplete(object sender)
        {
            this.m_CountConnectDeviceSuccess++;
            this.Count();
            this.LoadInterface();
        }

        private void machineItem_ConnectError(object sender, string Message)
        {
            this.m_CountConnectDeviceFail++;
            XtraMessageBox.Show(Message, "Th\x00f4ng B\x00e1o");
            this.LoadInterface();
        }

        private void machineItem_DisConnectComplete(object sender)
        {
            this.m_CountConnectDeviceSuccess--;
            this.Count();
            this.LoadInterface();
        }

        private void machineItem_OnTransactionEvent(object sender, string EnrollNumber, string EmployeeCode, string EmployeeName, System.DateTime Date, System.DateTime Hour, int StateInOut, int MachineID)
        {
            this.gcList.Refresh();
            this.gbList.AddNewRow();
            this.gbList.SetFocusedRowCellValue(this.colEnrollNumber, EnrollNumber);
            this.gbList.SetFocusedRowCellValue(this.colEmployeeCode, EmployeeCode);
            this.gbList.SetFocusedRowCellValue(this.colEmployeeName, EmployeeName);
            this.gbList.SetFocusedRowCellValue(this.colStateInOut, StateInOut);
            this.gbList.SetFocusedRowCellValue(this.colMachineID, MachineID);
            this.gbList.SetFocusedRowCellValue(this.colHour, Hour);
            this.gbList.SetFocusedRowCellValue(this.colDate, Date);
            if (this.checkAlert.Checked)
            {
                if (StateInOut == 0)
                {
                    this.alertControl1.Show(base.Parent as Form, "TH\x00f4ng B\x00e1o", "<color=blue><b>" + EmployeeName + " (" + EnrollNumber.ToString() + ")</b></color>   <color=blue> 'V\x00c0O' </color>   l\x00fac " + Hour.ToString());
                }
                else
                {
                    this.alertControl1.Show(base.Parent as Form, "TH\x00f4ng B\x00e1o", "<color=blue><b>" + EmployeeName + " (" + EnrollNumber.ToString() + ")</b></color>   <color=blue> 'RA' </color>   l\x00fac " + Hour.ToString());
                }
            }
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
        }

        private void repMachine_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == ButtonPredefines.Glyph)
            {
                new DIC_MACHINE().AddRepositoryGridLookupEdit(this.repMachine);
            }
        }

        private void repMachine_EditValueChanged(object sender, EventArgs e)
        {
            DIC_MACHINE dic_machine = new DIC_MACHINE();
            dic_machine.Get(this.m_MachineCode);
            this.m_IP = dic_machine.IP;
            this.m_Port = dic_machine.PortID;
        }

        private void repMachine_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_MachineCode = e.NewValue.ToString();
        }

        private void UpdateTimekeeper()
        {
            Thread thread;
            ThreadStart start2 = null;
            Options.SetWaitDialogCaption("Đang x\x00f3a dữ liệu...");
            HRM_TIMEKEEPER_MACHINE l_TimeKeeperMachine = new HRM_TIMEKEEPER_MACHINE();
            l_TimeKeeperMachine.DeleteAll();
            int num = 0;
            this.EnrollDataTable.Rows.Clear();
            foreach (DataRow row in (this.gcList.DataSource as DataTable).Rows)
            {
                if ((num % 100) == 0)
                {
                    Options.SetWaitDialogCaption("Đang th\x00eam dữ liệu..." + row["EnrollNumber"].ToString());
                }
                num++;
                l_TimeKeeperMachine.ID = Guid.NewGuid();
                l_TimeKeeperMachine.EnrollNumber = row["EnrollNumber"].ToString();
                l_TimeKeeperMachine.Date = Convert.ToDateTime(row["Date"].ToString());
                System.DateTime time = Convert.ToDateTime(row["Date"].ToString());
                System.DateTime time2 = Convert.ToDateTime(row["Hour"].ToString());
                l_TimeKeeperMachine.Hour = new System.DateTime(time.Year, time.Month, time.Day, time2.Hour, time2.Minute, time2.Second);
                l_TimeKeeperMachine.StateInOut = Convert.ToInt32(row["StateInOut"].ToString());
                l_TimeKeeperMachine.MachineID = row["MachineID"].ToString();
                l_TimeKeeperMachine.Insert();
                if (!this.IsExistEnrollDataTable(row["EnrollNumber"].ToString()))
                {
                    this.EnrollDataTable.Rows.Add(new object[] { row["EnrollNumber"].ToString() });
                }
            }
            Options.CloseDialog();
            System.DateTime BeginDate = Convert.ToDateTime(this.bbeCC.EditValue.ToString());
            System.DateTime EndDate = Convert.ToDateTime(this.bbeCCTo.EditValue.ToString());
            HRM_EMPLOYEE l_Employee = new HRM_EMPLOYEE();
            foreach (DataRow row in this.EnrollDataTable.Rows)
            {
                l_Employee.GetByEnroll(row["EnrollNumber"].ToString());
                HRM_EMPLOYEE_SCHEDULE hrm_employee_schedule = new HRM_EMPLOYEE_SCHEDULE();
                hrm_employee_schedule.Get(l_Employee.EmployeeCode);
                if (hrm_employee_schedule.IsAutomatic)
                {
                    Options.SetWaitDialogCaption("Đang nhận ca..." + l_Employee.FirstName + " " + l_Employee.LastName + "(" + l_Employee.EmployeeCode + ")");
                    if (start2 == null)
                    {
                        start2 = () => l_TimeKeeperMachine.SetShift(new System.DateTime(BeginDate.Year, BeginDate.Month, BeginDate.Day), new System.DateTime(EndDate.Year, EndDate.Month, EndDate.Day), l_Employee.EmployeeCode);
                    }
                    thread = new Thread(start2);
                    thread.Start();
                    thread.Join();
                }
            }
            Options.CloseDialog();
            IEnumerator enumerator = l_Employee.GetCompactList(MyLogin.Level, MyLogin.Code, 1, BeginDate, EndDate).Rows.GetEnumerator();
            {
                ThreadStart start = null;
                DataRow dr;
                while (enumerator.MoveNext())
                {
                    dr = (DataRow) enumerator.Current;
                    Options.SetWaitDialogCaption("Đang cập nhật..." + dr["FirstName"].ToString() + " " + dr["LastName"].ToString() + "(" + dr["EmployeeCode"].ToString() + ")");
                    if (start == null)
                    {
                        start = () => l_TimeKeeperMachine.UpdateTimeKeeper(new System.DateTime(BeginDate.Year, BeginDate.Month, BeginDate.Day), new System.DateTime(EndDate.Year, EndDate.Month, EndDate.Day), dr["EmployeeCode"].ToString());
                    }
                    thread = new Thread(start);
                    thread.Start();
                    thread.Join();
                }
            }
            Options.CloseDialog();
        }

        private void xtraScrollableControl1_SizeChanged(object sender, EventArgs e)
        {
        }

        private void xucAtt_Load(object sender, EventArgs e)
        {
        }

        public delegate void CallEventHandler();
    }
}

